﻿
@{
    Layout = null;
}

<!DOCTYPE html>

<html lang="zh-cn">

<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <meta name="applicable-device" content="pc,mobile" />
    <title>玄仁医疗</title>
    <link href="~/static/css/bootstrap.css" rel="stylesheet" />
    <link href="~/static/css/glide.css" rel="stylesheet" />
    <link href="~/static/css/style.css" rel="stylesheet" />
    <link href="~/static/css/online.css" rel="stylesheet" />
    <script src="~/static/js/jquery.min.js" type="text/javascript"></script>
    <script src="~/static/js/bootstrap.js" type="text/javascript"></script>
    <script src="~/static/js/jquery.glide.js" type="text/javascript"></script>
    <script src="~/static/js/common.js" type="text/javascript"></script>
    <script src="~/static/js/online.js" type="text/javascript"></script>
</head>
<style>
    .serviceBtn a {
        font-size: 16px;
    }
    .J_fs_col3 {
        margin-top:30px;
        width: 200px;
        height: 200px;
        z-index: 1;
    }
    .user {
        height: 102px;
        background-color: aliceblue;
        margin-top: 10px;
        overflow: hidden;
    }
    .user_inner {
        position: relative;
        padding-top: 67px;
        height: 35px;
    }
    .user_avatar {
        position: absolute;
        left: 20px;
        top: 30px;
        width: 44px;
        height: 44px;
    }
    .user_avatar_lk {
        overflow: hidden;
        -webkit-box-shadow: 0 2px 8px rgba(0,0,0,.05);
        box-shadow: 0 2px 8px rgba(0,0,0,.05);
    }
    .user_avatar_lk > img {
        border-radius: 50%;
        display: block;
        width: 40px;
        height: 40px;
    }
    .user_show {
        position: absolute;
        top: 30px;
        left: 74px;
        right: 10px;
    }
    .service {
        overflow: hidden;
        position: relative;
        height: 238px;
        -webkit-transition: all .2s ease;
        transition: all .2s ease;
    }
    .service_entry {
        overflow: hidden;
        padding: 5px .5px;
        background-color: aliceblue;
        height:100px;
    }
    .service_list {
        padding-top: 5px;
        height: 225px;
        margin-top:20px;
        font-size:14px;
    }
    .serviceitem {
        position: relative;
        float: left;
        width: 63px;
        height: 55px;
        text-align: center;
        overflow: hidden;
    }
    .serviceitem>span{
        display:block;
        margin-bottom:10px;
    }

    
</style>
<body>
    @Html.Action("Header", "Shared")

    <!-- 内容 -->
    <div class="container">
        <div class="row">

            <div class="col-xs-12 col-sm-9 col-md-9">
                <div class="aboutBox">
                    <a href="/Home/about" class="aboutMore">MORE +</a>
                    <div class="aboutTitle">
                        <h1>公司简介</h1>
                        <span>ABOUT US</span>
                    </div>
                    <section style="font-size:16px">
                        @ViewBag.About.CompanyInfo
                    </section>
                </div>
            </div>

            <div class="col-xs-12 col-sm-3 col-md-3">
                <div id="J_fs_col3" class="J_fs_col3">
                    <div id="j_user" class="J_user user">
                        <div class="user_inner">
                            <div>
                                <div class="J_user_avatar user_avatar">
                                    <a class="user_avatar_lk" href="" target="_blank" aria-label="个人头像">
                                        <img alt="avatar">
                                    </a>
                                </div>
                                <div class="user_show">
                                    <a id="username" href="#">Hi,欢迎逛玄仁医疗</a>
                                    <p>
                                        <a href="/Home/Login" class="user_login">登录</a>
                                        <a class='user_logout'>退出</a>
                                        &nbsp;|
                                    </p>
                                </div>
                            </div>
                        </div>
                    </div>

                    <div id="J_service" class="service">
                        <div class="service_entry">
                            <ul class="J_tab_head service_list">
                                @*<li class="serviceitem">
                                    <span class="glyphicon glyphicon-user"></span>
                                    <a href="#">个人主页</a>
                                </li>*@
                                    
                                <li class="serviceitem">
                                    <span class="glyphicon glyphicon-shopping-cart"></span>
                                    <a id="shopping" href="/ShoppingCart/ShppingCartList/">&nbsp;购物车</a>
                                </li>

                                <li class="serviceitem">
                                    <span class="glyphicon glyphicon-envelope"></span>
                                    <a href="/Home/Comment">留言</a>
                                </li>
                            </ul>
                        </div>
                    </div>
                </div>
            </div>

        </div>
    </div>

    <div style="background:#f9f9f9; padding-top:30px; margin-top:30px; padding-bottom:10px">
        <div class="container">
            <div class="row">

                <div class="col-xs-12 col-sm-12 col-md-12">
                    <div class="productBox">
                        <div class="titleBar">
                            <h1>最新产品</h1>
                            <span></span>
                        </div>
                        <div class="list">
                            @foreach (Xuanren_FrontEnd.Model.Product product in ViewBag.Product)
                            {
                                <div class="col-xs-6 col-sm-3 col-md-2 col-mm-6 productImg">
                                    <a title="@product.name" href='/Product/ProductDetail/@product.id'>
                                        <span class="imgLink-hover"><span class="hover-link"></span></span>
                                        <img src="~/images/@product.image" alt="@product.name" />
                                    </a>
                                    <a class="productTitle" href="/Product/ProductDetail/@product.id" title="@product.name">
                                        @product.name
                                    </a>
                                </div>
                            }
                        </div>
                    </div>
                </div>

            </div>
        </div>
    </div>

    <div class="container">
        <div class="row">
            <div class="col-xs-12 col-sm-9 col-md-9">
                <div class="newsBox">
                    <div class="titleBar">
                        <h1>新闻中心</h1>
                    </div>
                    <ul class="indexNewsList">
                        @* 遍历4条 *@
                        @foreach (var news in ViewBag.News) { 
                        <li class="col-xs-12 col-sm-6 col-md-6">
                            <a href="/Article/ArticleDetail/@news.id">
                                <div class="img" style="background-image: url(/images/@news.defaultImg)"></div>
                                <div class="txt">
                                    <span class="title">
                                        @news.title
                                    </span>
                                    <span class="time">[ @news.create_time.ToString("yyyy-MM-dd") ]</span>
                                    <p>
                                        @news.content...
                                    </p>
                                </div>
                            </a>
                        </li>
                        }
                    </ul>
                </div>
            </div>
            <div class="col-xs-12 col-sm-3 col-md-3">
                <div class="contactBox" style="padding:10px;">
                    <p>联系人：@ViewBag.About.ContactPerson</p>
                    <p>手机：@ViewBag.About.Phone</p>
                    <p>电话：@ViewBag.About.Telephone</p>
                    <p>邮箱：@ViewBag.About.Email</p>
                    <p>地址： @ViewBag.About.Address</p>
                </div>
            </div>
        </div>
    </div>

    <div style="background:#f9f9f9; padding-top:20px; margin-top:20px; padding-bottom:20px;">
        <div class="container">
            <div class="row">
                <div class="col-xs-12 col-sm-12 col-md-12">
                    <div class="linkBox">
                        <div class="titleBar">
                            <h1>友情链接</h1>
                            <span></span>
                            <ul class="linkList">
                                <li><a target="_blank" href="https://gitee.com/Haicos/xuanren-medical">Gitee</a></li>
                                <!--<li><a target="_blank" href="#">淘宝店</a></li>-->
                            </ul>
                        </div>

                    </div>
                </div>
            </div>
        </div>
    </div>

    @Html.Action("Footer", "Shared")

    <script src="~/static/api/login.js" type="text/javascript"></script>

    <script type="text/javascript">
        if ($(".banner .slider__wrapper li").length == 0) {
            $(".banner").addClass("emptyBanner");
        }
        $(".user_logout").click(function () {
            logout();
        });
    </script>

    <script>
        $(function () {
            var getUser = window.sessionStorage.getItem("userInfo");
            //从本地存储当中获取的值重新转化为JSON数据
            var userInfo = JSON.parse(getUser);
            $(".user_avatar_lk > img").attr("src", "/images/defaultAvatar.png")
            $(".user_logout").hide();

            if (userInfo != null) {
                $(".user_avatar_lk > img").attr("src", "/images/" + userInfo.avatar);
                $("#username").text("Hi," + userInfo.name);
                $(".user_logout").show();
                $(".user_login").hide();
            }
        });
    </script>
</body>
</html>

